package com.bailian.system.service.impl;

import java.util.List;
import com.bailian.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bailian.system.mapper.BlNewsTypeMapper;
import com.bailian.system.domain.BlNewsType;
import com.bailian.system.service.IBlNewsTypeService;

/**
 * 咨询类型Service业务层处理
 * 
 * @author bailian
 * @date 2025-08-04
 */
@Service
public class BlNewsTypeServiceImpl implements IBlNewsTypeService 
{
    @Autowired
    private BlNewsTypeMapper blNewsTypeMapper;

    /**
     * 查询咨询类型
     * 
     * @param id 咨询类型主键
     * @return 咨询类型
     */
    @Override
    public BlNewsType selectBlNewsTypeById(Long id)
    {
        return blNewsTypeMapper.selectBlNewsTypeById(id);
    }

    /**
     * 查询咨询类型列表
     * 
     * @param blNewsType 咨询类型
     * @return 咨询类型
     */
    @Override
    public List<BlNewsType> selectBlNewsTypeList(BlNewsType blNewsType)
    {
        return blNewsTypeMapper.selectBlNewsTypeList(blNewsType);
    }

    /**
     * 新增咨询类型
     * 
     * @param blNewsType 咨询类型
     * @return 结果
     */
    @Override
    public int insertBlNewsType(BlNewsType blNewsType)
    {
        blNewsType.setCreateTime(DateUtils.getNowDate());
        return blNewsTypeMapper.insertBlNewsType(blNewsType);
    }

    /**
     * 修改咨询类型
     * 
     * @param blNewsType 咨询类型
     * @return 结果
     */
    @Override
    public int updateBlNewsType(BlNewsType blNewsType)
    {
        blNewsType.setUpdateTime(DateUtils.getNowDate());
        return blNewsTypeMapper.updateBlNewsType(blNewsType);
    }

    /**
     * 批量删除咨询类型
     * 
     * @param ids 需要删除的咨询类型主键
     * @return 结果
     */
    @Override
    public int deleteBlNewsTypeByIds(Long[] ids)
    {
        return blNewsTypeMapper.deleteBlNewsTypeByIds(ids);
    }

    /**
     * 删除咨询类型信息
     * 
     * @param id 咨询类型主键
     * @return 结果
     */
    @Override
    public int deleteBlNewsTypeById(Long id)
    {
        return blNewsTypeMapper.deleteBlNewsTypeById(id);
    }
}
